Optimal. Leaf size=171 \[ \frac{2 b (A b-a B)}{a d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{a^{3/2} d}+\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}+\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.607033, antiderivative size = 171, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {3609, 3653, 3539, 3537, 63, 208, 3634} \[ \frac{2 b (A b-a B)}{a d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{a^{3/2} d}+\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}+\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3609
Rule 3653
Rule 3539
Rule 3537
Rule 63
Rule 208
Rule 3634
Rubi steps
\begin{align*} \int \frac{\cot (c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx &=\frac{2 b (A b-a B)}{a \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{2 \int \frac{\cot (c+d x) \left (\frac{1}{2} A \left (a^2+b^2\right )-\frac{1}{2} a (A b-a B) \tan (c+d x)+\frac{1}{2} b (A b-a B) \tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx}{a \left (a^2+b^2\right )}\\ &=\frac{2 b (A b-a B)}{a \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{A \int \frac{\cot (c+d x) \left (1+\tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx}{a}+\frac{2 \int \frac{-\frac{1}{2} a (A b-a B)-\frac{1}{2} a (a A+b B) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{a \left (a^2+b^2\right )}\\ &=\frac{2 b (A b-a B)}{a \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}-\frac{((i a+b) (A+i B)) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 \left (a^2+b^2\right )}+\frac{(i A+B) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a-i b)}+\frac{A \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac{2 b (A b-a B)}{a \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(2 A) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{a b d}-\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 (a-i b) d}-\frac{(A+i B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 (a+i b) d}\\ &=-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{a^{3/2} d}+\frac{2 b (A b-a B)}{a \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(i (A+i B)) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a+i b) b d}-\frac{(i A+B) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a-i b) b d}\\ &=-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{a^{3/2} d}+\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{(a-i b)^{3/2} d}+\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{(a+i b)^{3/2} d}+\frac{2 b (A b-a B)}{a \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}\\ \end{align*}
Mathematica [A] time = 1.18229, size = 186, normalized size = 1.09 \[ \frac{-\frac{2 A \left (a^2+b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{\sqrt{a}}+\frac{2 b (A b-a B)}{\sqrt{a+b \tan (c+d x)}}+\frac{a (a+i b) (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{\sqrt{a-i b}}+\frac{a (a-i b) (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{\sqrt{a+i b}}}{a d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 1.801, size = 63939, normalized size = 373.9 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (A + B \tan{\left (c + d x \right )}\right ) \cot{\left (c + d x \right )}}{\left (a + b \tan{\left (c + d x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \cot \left (d x + c\right )}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]